package com.guoxin.artconcurrency.chapter3;

public class FinalExample {
    int i; // 普通变量
    final int j; // final变量

    static FinalExample obj;

    public FinalExample() {
        i = 1;
        j = 2;
    }

    public static void writer() {
        obj = new FinalExample();
    }

    public static void reader() {
        FinalExample object = obj;
        int a = object.i;
        int b = object.j;
    }
}
